from redis import StrictRedis

class Config:
    DEBUG =None
    SECRET_KEY = "regsdgrgehtahahe4hadgrgh"

    #mysql数据库配置链接
    SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@localhost/info13"
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    #定义redis链接配置信息
    REDIS_HOST = "127.0.0.1"
    REDIS_PORT = 6379

    SESSION_TYPE ="redis"
    SESSION_REDIS = StrictRedis(host=REDIS_HOST,port=REDIS_PORT)
    SESSION_USE_SIGNER =True
    PERMANENT_SESSION_LIFETIME = 86400


class DevelopmentConfig(Config):
    DEBUG = True

class ProudctionConfig(Config):
    DEBUG = False


config_dict = {
    "development":DevelopmentConfig,
    "production":ProudctionConfig
}